<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Clash Docker 安装指南 | 精通Java编程</title>
    <!-- 引入Font Awesome -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <!-- 引入 Tailwind CSS -->
    <script src="https://cdn.tailwindcss.com"></script>
    <style>
        /* 自定义样式 */
        .step-card {
            transition: all 0.3s ease;
        }
        .step-card:hover {
            transform: translateY(-5px);
        }
        .code-block {
            font-family: 'Courier New', Courier, monospace;
        }
        .highlight {
            position: relative;
        }
        .highlight::after {
            content: '';
            position: absolute;
            left: 0;
            bottom: 0;
            width: 100%;
            height: 10px;
            background-color: rgba(59, 130, 246, 0.2);
            z-index: -1;
            transition: all 0.3s ease;
        }
        .highlight:hover::after {
            height: 100%;
        }
    </style>
</head>
<body class="bg-gray-50 text-gray-800">
    <!-- 导航栏 -->
    <header class="bg-gray-800 text-white py-5 shadow-lg">
        <div class="container mx-auto px-4 flex flex-col md:flex-row justify-between items-center">
            <h1 class="text-2xl font-bold mb-4 md:mb-0">
                <a href="/" class="text-white hover:text-gray-300 flex items-center">
                    精通Java编程
                </a>
            </h1>
            <nav>
                <ul class="flex flex-wrap justify-center md:justify-end gap-x-4 gap-y-2">
                    <li><a href="/" class="hover:bg-gray-700 px-3 py-2 rounded transition-colors duration-300">首页</a></li>
                    <li><a href="#" class="hover:bg-gray-700 px-3 py-2 rounded transition-colors duration-300">技术分享</a></li>
                    <li><a href="#" class="hover:bg-gray-700 px-3 py-2 rounded transition-colors duration-300">软件开发心得</a></li>
                    <li><a href="#" class="hover:bg-gray-700 px-3 py-2 rounded transition-colors duration-300">源码分析</a></li>
                    <li><a href="#" class="hover:bg-gray-700 px-3 py-2 rounded transition-colors duration-300">关于我们</a></li>
                    <li><a href="downloads.html" class="bg-blue-600 hover:bg-blue-700 px-3 py-2 rounded transition-colors duration-300">软件下载</a></li>
                </ul>
            </nav>
        </div>
    </header>

    <!-- 页面内容 -->
    <main class="container mx-auto px-4 py-8">
        <!-- 面包屑导航 -->
        <nav class="flex mb-6" aria-label="Breadcrumb">
            <ol class="inline-flex items-center space-x-1 md:space-x-3">
                <li class="inline-flex items-center">
                    <a href="/" class="text-gray-700 hover:text-blue-600 inline-flex items-center">
                        <i class="fas fa-home mr-2"></i>首页
                    </a>
                </li>
                <li>
                    <div class="flex items-center">
                        <i class="fas fa-angle-right text-gray-400 mx-1"></i>
                        <a href="downloads.html" class="text-gray-700 hover:text-blue-600 ml-1">软件下载</a>
                    </div>
                </li>
                <li aria-current="page">
                    <div class="flex items-center">
                        <i class="fas fa-angle-right text-gray-400 mx-1"></i>
                        <span class="text-blue-600 ml-1">Clash Docker安装指南</span>
                    </div>
                </li>
            </ol>
        </nav>

        <!-- 文章标题和元信息 -->
        <article class="max-w-4xl mx-auto">
            <header class="mb-8">
                <h1 class="text-3xl md:text-4xl font-bold mb-4 text-center">Clash Docker 离线安装与配置使用教程</h1>
                <div class="flex flex-wrap justify-center items-center gap-4 text-gray-600 mb-6">
                    <span class="flex items-center">
                        <i class="fas fa-calendar-alt mr-2"></i>2024-03-15
                    </span>
                    <span class="flex items-center">
                        <i class="fas fa-eye mr-2"></i>1,245次浏览
                    </span>
                    <span class="flex items-center">
                        <i class="fas fa-tags mr-2"></i>
                        <a href="#" class="hover:text-blue-600">Docker</a>, 
                        <a href="#" class="hover:text-blue-600">Clash</a>, 
                        <a href="#" class="hover:text-blue-600">代理工具</a>
                    </span>
                </div>
                <div class="bg-blue-50 border-l-4 border-blue-500 p-4 rounded-lg">
                    <p class="text-blue-800 flex items-center">
                        <i class="fas fa-info-circle mr-2"></i>
                        <strong>适用环境：</strong> 本教程基于国内网络环境设计，利用国内CDN加速资源，确保安装过程快速稳定
                    </p>
                </div>
            </header>

            <!-- 教程内容 -->
            <div class="bg-white rounded-xl shadow-md p-6 md:p-8 mb-8">
                <h2 class="text-2xl font-bold mb-6 flex items-center">
                    <div class="bg-blue-100 p-2 rounded-full mr-3">
                        <i class="fas fa-docker text-blue-600"></i>
                    </div>
                    <span>Clash Docker 安装指南</span>
                </h2>

                <!-- 步骤1 -->
                <section class="mb-8">
                    <h3 class="text-xl font-bold mb-4 highlight flex items-center">
                        <span class="bg-blue-600 text-white rounded-full w-6 h-6 flex items-center justify-center mr-3">1</span>
                        下载 Docker 离线镜像包
                    </h3>
                    <div class="bg-gray-50 rounded-lg p-4 mb-4">
                        <p class="text-gray-700 mb-3">使用国内 CDN 镜像快速下载：</p>
                        <div class="code-block bg-gray-800 text-gray-100 p-4 rounded-lg overflow-x-auto relative">
                            <button class="absolute top-2 right-2 bg-gray-700 text-gray-300 px-2 py-1 rounded text-sm hover:text-white">
                                <i class="fas fa-copy mr-1"></i>复制
                            </button>
                            <code>wget http://qiniu.dywlkj.com/clash-and-dashboard-latest.tar</code>
                        </div>
                    </div>
                    <div class="bg-yellow-50 border-l-4 border-yellow-400 p-4 rounded-lg">
                        <p class="text-yellow-800 flex items-start">
                            <i class="fas fa-exclamation-circle mt-1 mr-2"></i>
                            <span>下载前请确保有至少 200MB 的磁盘空间。如果下载速度慢，请检查您的网络连接或尝试更换下载源。</span>
                        </p>
                    </div>
                </section>

                <!-- 步骤2 -->
                <section class="mb-8">
                    <h3 class="text-xl font-bold mb-4 highlight flex items-center">
                        <span class="bg-blue-600 text-white rounded-full w-6 h-6 flex items-center justify-center mr-3">2</span>
                        导入 Docker 镜像
                    </h3>
                    <div class="bg-gray-50 rounded-lg p-4 mb-4">
                        <p class="text-gray-700 mb-3">将 <code>.tar</code> 镜像包导入到本地 Docker：</p>
                        <div class="code-block bg-gray-800 text-gray-100 p-4 rounded-lg overflow-x-auto relative">
                            <button class="absolute top-2 right-2 bg-gray-700 text-gray-300 px-2 py-1 rounded text-sm hover:text-white">
                                <i class="fas fa-copy mr-1"></i>复制
                            </button>
                            <code>docker load -i ./clash-and-dashboard-latest.tar</code>
                        </div>
                    </div>
                    <div class="bg-green-50 border-l-4 border-green-400 p-4 rounded-lg">
                        <p class="text-green-800 flex items-center">
                            <i class="fas fa-check-circle mr-2"></i>
                            <span>导入完成后可使用 <code class="bg-gray-200 px-2 py-1 rounded">docker images</code> 查看已导入的镜像</span>
                        </p>
                    </div>
                    <div class="bg-blue-50 rounded-lg p-4 mt-4">
                        <h4 class="font-semibold mb-2 flex items-center">
                            <i class="fas fa-lightbulb text-blue-500 mr-2"></i>常见问题
                        </h4>
                        <p class="text-gray-700 mb-1"><strong>Q: 导入镜像时提示权限不足？</strong></p>
                        <p class="text-gray-600 mb-3">A: 请在命令前添加 <code class="bg-gray-200 px-1 py-0.5 rounded">sudo</code> 或将当前用户加入 docker 用户组</p>
                        <p class="text-gray-700 mb-1"><strong>Q: 导入失败如何处理？</strong></p>
                        <p class="text-gray-600">A: 请检查文件完整性，重新下载后再试</p>
                    </div>
                </section>

                <!-- 步骤3 -->
                <section class="mb-8">
                    <h3 class="text-xl font-bold mb-4 highlight flex items-center">
                        <span class="bg-blue-600 text-white rounded-full w-6 h-6 flex items-center justify-center mr-3">3</span>
                        准备 Clash 配置文件
                    </h3>
                    <div class="bg-gray-50 rounded-lg p-4 mb-4">
                        <p class="text-gray-700 mb-3">首先创建配置目录：</p>
                        <div class="code-block bg-gray-800 text-gray-100 p-4 rounded-lg overflow-x-auto relative">
                            <button class="absolute top-2 right-2 bg-gray-700 text-gray-300 px-2 py-1 rounded text-sm hover:text-white">
                                <i class="fas fa-copy mr-1"></i>复制
                            </button>
                            <code>mkdir -p ~/.config/clash/</code>
                        </div>
                    </div>
                    <div class="bg-gray-50 rounded-lg p-4 mb-4">
                        <p class="text-gray-700 mb-3">下载你的 Clash 配置文件（替换成你的服务商订阅链接）：</p>
                        <div class="code-block bg-gray-800 text-gray-100 p-4 rounded-lg overflow-x-auto relative">
                            <button class="absolute top-2 right-2 bg-gray-700 text-gray-300 px-2 py-1 rounded text-sm hover:text-white">
                                <i class="fas fa-copy mr-1"></i>复制
                            </button>
                            <code>wget -O ~/.config/clash/clash.yaml http://你的服务商订阅地址/clash.yaml</code>
                        </div>
                    </div>
                    <div class="bg-purple-50 border-l-4 border-purple-400 p-4 rounded-lg">
                        <h4 class="font-semibold text-purple-800 mb-2 flex items-center">
                            <i class="fas fa-exclamation-triangle mr-2"></i>重要提示
                        </h4>
                        <ul class="list-disc pl-5 text-gray-700">
                            <li>Clash 配置文件名应为 <code class="bg-gray-200 px-1 py-0.5 rounded">clash.yaml</code></li>
                            <li>若服务商提供 <code class="bg-gray-200 px-1 py-0.5 rounded">config.yaml</code>，需重命名为 <code class="bg-gray-200 px-1 py-0.5 rounded">clash.yaml</code></li>
                            <li>配置文件需放在 <code class="bg-gray-200 px-1 py-0.5 rounded">~/.config/clash/</code> 目录下</li>
                        </ul>
                    </div>
                </section>

                <!-- 步骤4 -->
                <section class="mb-8">
                    <h3 class="text-xl font-bold mb-4 highlight flex items-center">
                        <span class="bg-blue-600 text-white rounded-full w-6 h-6 flex items-center justify-center mr-3">4</span>
                        启动 Clash Docker 容器
                    </h3>
                    <div class="bg-gray-50 rounded-lg p-4 mb-4">
                        <p class="text-gray-700 mb-3">执行以下命令启动容器：</p>
                        <div class="code-block bg-gray-800 text-gray-100 p-4 rounded-lg overflow-x-auto relative">
                            <button class="absolute top-2 right-2 bg-gray-700 text-gray-300 px-2 py-1 rounded text-sm hover:text-white">
                                <i class="fas fa-copy mr-1"></i>复制
                            </button>
                            <pre>docker run -d \
  --name clash \
  --log-opt max-size=1m \
  -v ~/.config/clash/clash.yaml:/root/.config/clash/config.yaml \
  -p 6880:8080 \  
  -p 7890:7890 \   
  laoyutang/clash-and-dashboard:latest</pre>
                        </div>
                    </div>
                    <div class="grid md:grid-cols-2 gap-4 mb-4">
                        <div class="bg-blue-50 p-4 rounded-lg">
                            <h4 class="font-semibold text-blue-700 mb-2 flex items-center">
                                <i class="fas fa-network-wired mr-2"></i>端口说明
                            </h4>
                            <ul class="list-disc pl-5 text-gray-700">
                                <li><strong>7890</strong>：HTTP/SOCKS5代理端口</li>
                                <li><strong>8080</strong>：Web管理界面（映射为6880）</li>
                                <li><strong>9090</strong>：RESTful API端口（可选）</li>
                            </ul>
                        </div>
                        <div class="bg-green-50 p-4 rounded-lg">
                            <h4 class="font-semibold text-green-700 mb-2 flex items-center">
                                <i class="fas fa-link mr-2"></i>访问方式
                            </h4>
                            <ul class="list-disc pl-5 text-gray-700">
                                <li>面板地址: <a href="#" class="text-blue-600 hover:underline">http://localhost:6880</a></li>
                                <li>外部访问: <a href="#" class="text-blue-600 hover:underline">http://你的服务器IP:6880</a></li>
                            </ul>
                        </div>
                    </div>
                    <div class="bg-yellow-50 border-l-4 border-yellow-400 p-4 rounded-lg">
                        <p class="text-yellow-800 flex items-start">
                            <i class="fas fa-exclamation-circle mt-1 mr-2"></i>
                            <span>如果6880端口已被占用，请修改第一个端口映射参数（如 <code class="bg-gray-200 px-1 py-0.5 rounded">-p 6881:8080</code>）</span>
                        </p>
                    </div>
                </section>

                <!-- 步骤5 -->
                <section class="mb-8">
                    <h3 class="text-xl font-bold mb-4 highlight flex items-center">
                        <span class="bg-blue-600 text-white rounded-full w-6 h-6 flex items-center justify-center mr-3">5</span>
                        配置代理环境变量
                    </h3>
                    <div class="bg-gray-50 rounded-lg p-4 mb-4">
                        <p class="text-gray-700 mb-3">临时设置（仅当前终端有效）：</p>
                        <div class="code-block bg-gray-800 text-gray-100 p-4 rounded-lg overflow-x-auto relative">
                            <button class="absolute top-2 right-2 bg-gray-700 text-gray-300 px-2 py-1 rounded text-sm hover:text-white">
                                <i class="fas fa-copy mr-1"></i>复制
                            </button>
                            <pre>export https_proxy=http://127.0.0.1:7890
export http_proxy=http://127.0.0.1:7890
export all_proxy=socks5://127.0.0.1:7890</pre>
                        </div>
                    </div>
                    <div class="bg-gray-50 rounded-lg p-4 mb-4">
                        <p class="text-gray-700 mb-3">永久设置（添加到 Shell 配置文件）：</p>
                        <div class="code-block bg-gray-800 text-gray-100 p-4 rounded-lg overflow-x-auto relative">
                            <button class="absolute top-2 right-2 bg-gray-700 text-gray-300 px-2 py-1 rounded text-sm hover:text-white">
                                <i class="fas fa-copy mr-1"></i>复制
                            </button>
                            <pre>echo 'export https_proxy=http://127.0.0.1:7890' >> ~/.bashrc
echo 'export http_proxy=http://127.0.0.1:7890' >> ~/.bashrc
echo 'export all_proxy=socks5://127.0.0.1:7890' >> ~/.bashrc
source ~/.bashrc</pre>
                        </div>
                    </div>
                    <div class="bg-red-50 border-l-4 border-red-400 p-4 rounded-lg">
                        <p class="text-red-800 flex items-start">
                            <i class="fas fa-exclamation-triangle mt-1 mr-2"></i>
                            <span>注意：全局设置代理后，所有网络请求都会通过Clash，请确保Clash服务正常运行。</span>
                        </p>
                    </div>
                </section>

                <!-- 管理容器 -->
                <section class="mb-8">
                    <h3 class="text-2xl font-bold mb-6 flex items-center">
                        <i class="fas fa-cogs mr-3 text-blue-600"></i>容器管理命令
                    </h3>
                    <div class="overflow-x-auto">
                        <table class="min-w-full bg-white border border-gray-200">
                            <thead class="bg-blue-50">
                                <tr>
                                    <th class="py-3 px-4 border-b text-left font-semibold text-blue-700">功能</th>
                                    <th class="py-3 px-4 border-b text-left font-semibold text-blue-700">命令</th>
                                    <th class="py-3 px-4 border-b text-left font-semibold text-blue-700">说明</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr class="hover:bg-gray-50">
                                    <td class="py-3 px-4 border-b">停止容器</td>
                                    <td class="py-3 px-4 border-b font-mono"><code>docker stop clash</code></td>
                                    <td class="py-3 px-4 border-b">停止运行中的Clash容器</td>
                                </tr>
                                <tr class="hover:bg-gray-50">
                                    <td class="py-3 px-4 border-b">启动容器</td>
                                    <td class="py-3 px-4 border-b font-mono"><code>docker start clash</code></td>
                                    <td class="py-3 px-4 border-b">启动已停止的Clash容器</td>
                                </tr>
                                <tr class="hover:bg-gray-50">
                                    <td class="py-3 px-4 border-b">重启容器</td>
                                    <td class="py-3 px-4 border-b font-mono"><code>docker restart clash</code></td>
                                    <td class="py-3 px-4 border-b">重启Clash容器</td>
                                </tr>
                                <tr class="hover:bg-gray-50">
                                    <td class="py-3 px-4 border-b">查看日志</td>
                                    <td class="py-3 px-4 border-b font-mono"><code>docker logs clash</code></td>
                                    <td class="py-3 px-4 border-b">查看容器运行日志</td>
                                </tr>
                                <tr class="hover:bg-gray-50">
                                    <td class="py-3 px-4 border-b">删除容器</td>
                                    <td class="py-3 px-4 border-b font-mono"><code>docker rm -f clash</code></td>
                                    <td class="py-3 px-4 border-b">删除Clash容器</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </section>

                <!-- 常见问题 -->
                <section class="mb-8">
                    <h2 class="text-2xl font-bold mb-6 flex items-center">
                        <i class="fas fa-question-circle mr-3 text-blue-600"></i>常见问题
                    </h2>
                    <div class="space-y-4">
                        <div class="border border-gray-200 rounded-lg overflow-hidden">
                            <button class="w-full px-4 py-3 bg-gray-50 text-left font-semibold flex justify-between items-center">
                                <span>Q: 仪表盘无法访问怎么办？</span>
                                <i class="fas fa-chevron-down"></i>
                            </button>
                            <div class="px-4 py-3 bg-white hidden">
                                <p class="text-gray-700 mb-2">1. 检查容器是否正在运行：</p>
                                <div class="code-block bg-gray-800 text-gray-100 p-3 rounded mb-2">
                                    <code>docker ps</code>
                                </div>
                                <p class="text-gray-700 mb-2">2. 检查防火墙是否放行了6880端口</p>
                                <p class="text-gray-700 mb-2">3. 尝试改用 <code class="bg-gray-200 px-1 py-0.5 rounded">http://[服务器IP]:6880</code> 访问</p>
                                <p class="text-gray-700">4. 查看容器日志排查问题：</p>
                                <div class="code-block bg-gray-800 text-gray-100 p-3 rounded">
                                    <code>docker logs clash</code>
                                </div>
                            </div>
                        </div>
                        <div class="border border-gray-200 rounded-lg overflow-hidden">
                            <button class="w-full px-4 py-3 bg-gray-50 text-left font-semibold flex justify-between items-center">
                                <span>Q: 如何更新Clash配置？</span>
                                <i class="fas fa-chevron-down"></i>
                            </button>
                            <div class="px-4 py-3 bg-white hidden">
                                <p class="text-gray-700 mb-1">方法1：重新下载配置文件</p>
                                <div class="code-block bg-gray-800 text-gray-100 p-3 rounded mb-2">
                                    <code>wget -O ~/.config/clash/clash.yaml http://你的服务商订阅地址/clash.yaml</code>
                                </div>
                                <p class="text-gray-700 mb-1">然后重启容器：</p>
                                <div class="code-block bg-gray-800 text-gray-100 p-3 rounded">
                                    <code>docker restart clash</code>
                                </div>
                            </div>
                        </div>
                        <div class="border border-gray-200 rounded-lg overflow-hidden">
                            <button class="w-full px-4 py-3 bg-gray-50 text-left font-semibold flex justify-between items-center">
                                <span>Q: 如何设置开机自启？</span>
                                <i class="fas fa-chevron-down"></i>
                            </button>
                            <div class="px-4 py-3 bg-white hidden">
                                <p class="text-gray-700 mb-1">使用 <code class="bg-gray-200 px-1 py-0.5 rounded">--restart always</code> 参数启动容器：</p>
                                <div class="code-block bg-gray-800 text-gray-100 p-3 rounded mb-2">
                                    <pre>docker run -d --restart always --name clash \
  -v ~/.config/clash/clash.yaml:/root/.config/clash/config.yaml \
  -p 6880:8080 -p 7890:7890 \
  laoyutang/clash-and-dashboard:latest</pre>
                                </div>
                                <p class="text-gray-700">如果容器已创建，可以使用以下命令更新重启策略：</p>
                                <div class="code-block bg-gray-800 text-gray-100 p-3 rounded">
                                    <code>docker update --restart always clash</code>
                                </div>
                            </div>
                        </div>
                    </div>
                </section>

                <!-- 总结 -->
                <section class="mb-8">
                    <h2 class="text-2xl font-bold mb-6 flex items-center">
                        <i class="fas fa-clipboard-check mr-3 text-blue-600"></i>安装总结
                    </h2>
                    <div class="bg-blue-50 rounded-xl p-6">
                        <div class="flex items-start mb-4">
                            <div class="bg-blue-100 p-2 rounded-full mr-4">
                                <i class="fas fa-check text-blue-600"></i>
                            </div>
                            <div>
                                <h3 class="text-xl font-semibold mb-2">安装验证</h3>
                                <p class="text-gray-700">完成所有步骤后，请访问 <a href="#" class="text-blue-600 hover:underline">http://localhost:6880</a> 检查Clash仪表盘是否正常显示。</p>
                            </div>
                        </div>
                        <div class="flex items-start">
                            <div class="bg-blue-100 p-2 rounded-full mr-4">
                                <i class="fas fa-globe text-blue-600"></i>
                            </div>
                            <div>
                                <h3 class="text-xl font-semibold mb-2">网络测试</h3>
                                <p class="text-gray-700">执行以下命令测试代理是否生效：</p>
                                <div class="code-block bg-gray-800 text-gray-100 p-3 rounded mt-2">
                                    <code>curl --proxy http://127.0.0.1:7890 https://www.google.com</code>
                                </div>
                            </div>
                        </div>
                    </div>
                </section>

                <!-- 相关资源 -->
                <section>
                    <h2 class="text-2xl font-bold mb-6 flex items-center">
                        <i class="fas fa-link mr-3 text-blue-600"></i>相关资源
                    </h2>
                    <div class="grid md:grid-cols-2 gap-6">
                        <a href="#" class="bg-white hover:shadow-lg rounded-lg p-6 transition-all border border-gray-200">
                            <div class="flex items-start">
                                <div class="bg-blue-100 p-3 rounded-full mr-4">
                                    <i class="fas fa-file-alt text-blue-600"></i>
                                </div>
                                <div>
                                    <h3 class="text-lg font-semibold mb-1">Clash 配置进阶指南</h3>
                                    <p class="text-gray-600">学习如何自定义规则组、策略和分流规则</p>
                                </div>
                            </div>
                        </a>
                        <a href="#" class="bg-white hover:shadow-lg rounded-lg p-6 transition-all border border-gray-200">
                            <div class="flex items-start">
                                <div class="bg-green-100 p-3 rounded-full mr-4">
                                    <i class="fas fa-exchange-alt text-green-600"></i>
                                </div>
                                <div>
                                    <h3 class="text-lg font-semibold mb-1">订阅转换工具使用教程</h3>
                                    <p class="text-gray-600">将各种订阅格式转换为Clash兼容配置</p>
                                </div>
                            </div>
                        </a>
                    </div>
                </section>
            </div>
        </article>
    </main>

    <!-- 页脚 -->
    <footer class="bg-gray-100 text-gray-600 py-8">
        <div class="container mx-auto px-4">
            <div class="grid md:grid-cols-4 gap-8 mb-8">
                <div>
                    <h3 class="text-lg font-semibold mb-4 text-gray-800">关于本站</h3>
                    <p class="mb-4">专注Java及相关技术分享的技术博客，提供实用教程和资源下载。</p>
                    <div class="flex space-x-4">
                        <a href="#" class="text-gray-500 hover:text-blue-600"><i class="fab fa-github text-xl"></i></a>
                        <a href="#" class="text-gray-500 hover:text-blue-600"><i class="fab fa-weixin text-xl"></i></a>
                        <a href="#" class="text-gray-500 hover:text-blue-600"><i class="fas fa-envelope text-xl"></i></a>
                    </div>
                </div>
                <div>
                    <h3 class="text-lg font-semibold mb-4 text-gray-800">快速链接</h3>
                    <ul class="space-y-2">
                        <li><a href="/" class="hover:text-blue-600 transition-colors">首页</a></li>
                        <li><a href="#" class="hover:text-blue-600 transition-colors">技术教程</a></li>
                        <li><a href="#" class="hover:text-blue-600 transition-colors">博客文章</a></li>
                        <li><a href="downloads.html" class="hover:text-blue-600 transition-colors">资源下载</a></li>
                    </ul>
                </div>
                <div>
                    <h3 class="text-lg font-semibold mb-4 text-gray-800">帮助支持</h3>
                    <ul class="space-y-2">
                        <li><a href="#" class="hover:text-blue-600 transition-colors">常见问题</a></li>
                        <li><a href="#" class="hover:text-blue-600 transition-colors">联系我们</a></li>
                        <li><a href="#" class="hover:text-blue-600 transition-colors">反馈建议</a></li>
                    </ul>
                </div>
                <div>
                    <h3 class="text-lg font-semibold mb-4 text-gray-800">联系信息</h3>
                    <p class="mb-2"><i class="fas fa-envelope mr-2"></i> contact@xiongmingcai.top</p>
                    <p><i class="fas fa-server mr-2"></i> 服务器IP：106.53.241.88</p>
                </div>
            </div>
            <div class="border-t border-gray-200 pt-6 text-center">
                <p>&copy; 2024 精通Java编程. 湘ICP备2024043969号-1 | 域名：xiongmingcai.top</p>
            </div>
        </div>
    </footer>

    <script>
        // 简单的折叠功能
        document.querySelectorAll('.border-gray-200 button').forEach(button => {
            button.addEventListener('click', () => {
                const content = button.nextElementSibling;
                const icon = button.querySelector('i');
                
                content.classList.toggle('hidden');
                icon.classList.toggle('fa-chevron-down');
                icon.classList.toggle('fa-chevron-up');
            });
        });

        // 复制代码功能
        document.querySelectorAll('.code-block button').forEach(button => {
            button.addEventListener('click', () => {
                const codeBlock = button.parentElement;
                const code = codeBlock.querySelector('code').textContent;
                
                navigator.clipboard.writeText(code).then(() => {
                    button.innerHTML = '<i class="fas fa-check mr-1"></i>已复制';
                    setTimeout(() => {
                        button.innerHTML = '<i class="fas fa-copy mr-1"></i>复制';
                    }, 2000);
                });
            });
        });
    </script>
</body>
</html>
